]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Keep tray after clicking summary item
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 21 Sep 2012 15:21:25 +0000 (17:21 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 25 Sep 2012 06:25:25 +0000 (08:25 +0200)
Currently if a summary item signals that it has handled a click
itself, the tray hides itself. This behavior is wrong for the
On-Screen-Keyboard, which appears as a unit with the tray, so add
a property to opt-out of the default behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=683546

js/ui/keyboard.js
js/ui/messageTray.js

index 09551dc9b280dc3fe8801d9bc5923732a250cc28..723f89a2efd48aaf6f0eaadb690ee035c2db0549 100644 (file)
@@ -565,6 +565,7 @@ const KeyboardSource = new Lang.Class({
     _init: function(keyboard) {
         this._keyboard = keyboard;
         this.parent(_("Keyboard"), 'input-keyboard-symbolic');
+        this.keepTrayOnSummaryClick = true;
     },
 
     handleSummaryClick: function() {
index 7f76b959d54a4ea96d03e69fe1a29c1bb275f512..55d8c37a5d13ae338d5a57069e3b326592017292 100644 (file)
@@ -1052,6 +1052,7 @@ const Source = new Lang.Class({
         this.isChat = false;
         this.isMuted = false;
         this.showInLockScreen = true;
+        this.keepTrayOnSummaryClick = false;
 
         this.notifications = [];
     },
@@ -1776,7 +1777,10 @@ const MessageTray = new Lang.Class({
 
     _onSummaryItemClicked: function(summaryItem, button) {
         if (summaryItem.source.handleSummaryClick()) {
-            this._escapeTray();
+            if (summaryItem.source.keepTrayOnSummaryClick)
+                this._setClickedSummaryItem(null);
+            else
+                this._escapeTray();
         } else {
             if (!this._setClickedSummaryItem(summaryItem, button))
                 this._setClickedSummaryItem(null);